package com.bionic.banking.dao;

import com.bionic.banking.dao.connection.DBQueryManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

public interface AbstractDao<T> {

    String getTableName();

    String getKeyColumn();

    T findById(int id) throws SQLException;

    List<T> findAll() throws SQLException;

    Integer create(T entity) throws SQLException;

    boolean update(T entity) throws SQLException;
    //void save(T entity);    

    void remove(int id) throws SQLException;

    DBQueryManager<T> getDBManager();

    T populateDto(ResultSet rs) throws SQLException;

    void setMaxRows(int maxRows);

    int getMaxRows();
}
